import java.awt.*;

// 蛋白质
class Protein extends GameElement {
    public Protein(float x, float y, int size, Color color, float effect, float duration) {
        super(x, y, size, color, effect, duration);
        this.floatSpeed *= 0.8f; // 有益物质移动更慢
    }

    @Override
    public boolean update() {
        // 更频繁地改变方向
        if (Math.random() < 0.1) {
            floatDirection = (float) (Math.random() * Math.PI * 2);
        }
        return super.update();
    }
}
